package com.user.gamecenter.network;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Streaming;
import retrofit2.http.Url;


/**
 * Created by cms on 2016/12/6.
 */

public interface HttpInterfaceManager {

    @FormUrlEncoded
    @POST("{urlParameter}")
    Observable<Object> commonPostRequest(@Path("urlParameter") String urlParameter, @FieldMap Map<String, Object> fieldMap);

    @POST
    Observable<Object> commonFileUploadRequest(@Url String fileUrl, @Body RequestBody content);

    @Streaming
    @GET
    Observable<ResponseBody> commonFileDownloadRequest(@Url String fileUrl);

}
